<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">日志列表</h1>
</div>
<div class="wrapper-md">
  <div class="panel panel-default">

    <!--  按钮  -->
    <div class="panel-heading">
      <div class="row">
        <div class="col-sm-6">
          <button class="btn m-b-xs w-xs btn-primary" ng-click="back()">后  退</button>
          <button class="btn m-b-xs w-xs btn-success" ng-model="time" btn-checkbox="" ng-click="refresh()">
            <span class="text">自动刷新</span>
            <i class="fa fa-check text-active"></i>
            <span class="text-active">刷新...<i>{{timeout}}</i></span>
          </button>
          <button class="btn m-b-xs w-xs btn-success" ng-click="search()">搜  索</button>
        </div>
      </div>
    </div>

    <!--  搜索框  -->
    <div class="row wrapper" >
      <div class="col-sm-6 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">接口标识</span>
          </div>
          <ui-select ng-model="searchData.url" theme="bootstrap">
            <ui-select-match placeholder="选择接口...">{{$select.selected}}</ui-select-match>
            <ui-select-choices repeat="item in apiname_list | filter: $select.search">
              <span ng-bind-html="item"></span>
            </ui-select-choices>
          </ui-select>
        </div>
      </div>
      <div class="col-sm-4 m-b-xs">
        <div class="input-group" >
          <div class="input-group-btn" >
            <span class="btn btn-default">请求ID</span>
          </div>
          <input type="text" class="form-control ng-pristine ng-valid ng-touched" ng-model="searchData.id">
        </div>
      </div>
    </div>

    <!--  数据表格  -->
    <table class="table table-striped table-bordered ng-isolate-scope dataTable no-footer" 
      style="display: table; width: 100%;table-layout:fixed;">
      <thead>
        <tr>
          <th style="width: 12%;text-align:center;">接口标识</th>
          <th style="width: 7%;text-align:center;">时间</th>
          <th style="width: 3%;text-align:center;">级别</th>
          <th style="width: 15%;text-align:center;">{{flag?"参数":"内容"}}</th>
          <th style="width: 3%;text-align:center;">操作</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="info in log_list">
          <td style="text-align:left;word-break:break-all">{{info._id}}<br />{{info._collectionid}}</td>
          <td style="text-align:center;">{{info.date}}<br/>{{"耗时:"+info.spend_c+"ms"}}</td>
          <td style="text-align:center;">{{info.level}}</td>
          <td style="text-align:left;word-break:break-all">{{flag?info.params_list:info.y_parent}}</td>
          <td style="text-align:center;">
            <button type="button" class="btn btn-info btn-xs" ng-click="getInfo(info)">查看</button>
          </td>
        </tr>
      </tbody>
    </table>
    
    <div class="text-right" style="background-color: white">
      <pagination total-items="totalItems" ng-model="currentPage" ng-change="search()" previous-text="上一页" next-text="下一页"
        first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
        class="m-t-none m-b"></pagination>
    </div>
    
  </div>
</div>
